<template>
  <view :style="{ paddingTop: top + 'px' }" class="min-h-screen bg bg-[#F8F8F8]">
    <view :style="{ height: pendantHight + 'px' }"
      class="text-[#3D3D3D] font-medium  flex items-center justify-center text-[40rpx]">我的</view>
    <view class="text-center font-bold" v-if="role == 'admin'">xxx管理端</view>
    <!-- <view v-if="role != 'admin'" @click="navigateTo('/pages/login/login')" class="mx-[30rpx] flex items-center mt-[52rpx]">
      <image class="w-[130rpx] h-[130rpx] rounded-full"
        src="https://gangantao.com/image/20241216/489657c8-7f43-436b-a626-c1d7e390588a.png"></image>
      <view  class="ml-[20rpx] flex items-center justify-between flex-1">
        <view >
          <view class="text-[36rpx] text-[#3D3D3D]">{{ isLogin ? '张大仙' : '请登录' }}</view>
          <view class="text-[#7D7D7D] text-[24rpx]">{{ isLogin ? '15077402465' : '注册账户获取更多权益' }}</view>
        </view>
        <image v-if="isLogin" class="w-[57rpx] h-[57rpx]"
          src="">
        </image>

      </view>
    </view>  -->
    <view v-if="role == 'admin'" @click="navigateTo('/pages/login/login')"
      class="mx-[30rpx] flex items-center mt-[52rpx]">
      <image class="w-[130rpx] h-[130rpx] rounded-full"
        src="https://gangantao.com/image/20241216/489657c8-7f43-436b-a626-c1d7e390588a.png"></image>
      <view class="ml-[20rpx] flex items-center justify-between flex-1">
        <view @click.stop="getUserinfo">
          <view class="text-[30rpx]">岗位：xxxx管理员</view>
          <view class=" text-[30rpx] mt-[20rpx]">张三 GLY151236487895</view>
        </view>
        <image v-if="isLogin" class="w-[57rpx] h-[57rpx]"
          src="">
        </image>

      </view>
    </view>
    <view v-if="role == 'student'" @click="navigateTo('/pages/login/login')"
      class="mx-[30rpx] flex items-center mt-[52rpx]">
      <image class="w-[130rpx] h-[130rpx] rounded-full"
        :src="getDataUril.getSplitImgUrl(userInfo.avatar)"></image> 
      <view class="ml-[20rpx] flex items-center justify-between flex-1">
        <view>
          <view class="text-[34rpx]   flex justify-center items-center rounded-[189rpx]">
            {{ userInfo.nickname }} <view class="ml-2 px-[16rpx] text-[30rpx] py-[4rpx] bg-[#FD8B75] text-white rounded-full">学员</view>
          </view>
          <view class=" text-[26rpx] mt-[10rpx] text-[#b1b1b1]">{{ userInfo.mobile }}</view>
        </view>
        <image class="w-[57rpx] h-[57rpx]"
          src="">
        </image>

      </view>
    </view>
    <view v-if="role == 'noLogin'" @click="navigateTo('/pages/login/login')"
      class="mx-[30rpx] flex items-center mt-[52rpx]">
      <image class="w-[130rpx] h-[130rpx] rounded-full"
        src="https://gangantao.com/image/20241216/489657c8-7f43-436b-a626-c1d7e390588a.png"></image>
      <view class="ml-[20rpx] flex items-center justify-between flex-1">
        <view>
          <view
            class="text-[30rpx] bg-[#FF927F] text-white w-[150rpx] flex justify-center items-center rounded-[189rpx] py-[10rpx]">
            立即登录</view>
          <view class=" text-[30rpx] mt-[10rpx]">登录可体验更多功能</view>
        </view>


      </view>
    </view>

    <view class="ml-[16rpx] mr-[20rpx]">
      <view class="jf rounded-t-[20rpx] flex justify-between mt-[24rpx] text-white  py-[26rpx] text-center">
        <view class="border-r border-[#FD755D] w-[25%] h-[50%] py-[20rpx] relative">
          领学分
          <view class="w-[14rpx] h-[14rpx] rounded-full bg-[red] absolute right-[20%] top-[20%]"></view>
        </view>
        <view @click="navigateTo('/pages/creditDetail/creditDetail')" class="w-[25%] h-[50%] py-[20rpx]">我的学分</view>
        <view class="w-[25%] h-[50%] py-[20rpx] font-bold text-[42rpx]">0分</view>
        <view class="w-[25%] h-[50%] py-[20rpx] flex items-center">查看明细<u-icon name="arrow-right" color="#FFF"
            size="16"></u-icon></view>
      </view>
      <view
        class="mt-[20rpx] px-[38rpx] flex justify-between bg-white pt-[25rpx] pb-[20rpx] text-[30rpx] font-normal rounded">
        <view @click="navigateTo('/pages/registeredClass/registeredClass')"
          class="flex flex-col justify-center items-center">
          <image class="h-[64rpx] w-[64rpx]"
            src="https://gangantao.com/image/20241218/924a6265-b16f-49f9-9321-debcd795cc5f.png"></image>
          <view class="mt-[24rpx]">已报班级</view>
        </view>
        <view @click="navigateTo('/pages/exclusiveClassSchedule/exclusiveClassSchedule')"
          class="flex flex-col justify-center items-center">
          <image class="h-[64rpx] w-[64rpx]"
            src="https://gangantao.com/image/20241218/47c48557-5595-4b18-8e8b-51b2085f5ddb.png"></image>
          <view class="mt-[24rpx]">专属课程</view>
        </view>
        <view @click="navigateTo('/pages/curriculumManagement/curriculumManagement')"
          class="flex flex-col justify-center items-center">
          <image class="h-[64rpx] w-[64rpx]"
            src="https://gangantao.com/image/20241218/11ab3890-1d18-41bb-9804-a4b410dc0262.png"></image>
          <view class="mt-[24rpx]">课程管理</view>
        </view>
        <view @click="navigateTo('/pages/myAppointment/myAppointment')"
          class="flex flex-col justify-center items-center">
          <image class="h-[64rpx] w-[64rpx]"
            src="https://gangantao.com/image/20241218/1b70ebc3-47d0-4fd2-a842-da08d302d3e0.png"></image>
          <view class="mt-[24rpx]">我的预约</view>
        </view>
      </view>

    </view>
    <view class="rounded-[20rpx] bg-[#ffffff] m-[20rpx]  ">
      <block v-if="role == 'student'">
        <view @click="navigateTo('/pages/picturesUpload/picturesUpload')"
          class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
          <view class="w-[53rpx]">
            <image class="w-[47rpx] h-[40rpx]"
              src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657a9c66bea.png">
            </image>
          </view>

          <view class=" ml-[15rpx]">一键拍照上传</view>
          <view class="ml-auto">
            <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
          </view>
        </view>
        <view @click="navigateTo('/pages/cardManagement/cardManagement')"
          class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
          <view class="w-[53rpx]">
            <image class="w-[40rpx] h-[40rpx]"
              src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657b0a354ac.png">
            </image>
          </view>
          <view class=" ml-[15rpx]">卡券管理</view>
          <view class="ml-auto">
            <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
          </view>
        </view>
        <view @click="navigateTo('/pages/erventManagement_offlineEvents/erventManagement_offlineEvents')"
          class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
          <view class="w-[53rpx]">
            <image class="w-[50rpx] h-[50rpx]"
              src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657c142d093.png">
            </image>
          </view>
          <view class=" ml-[15rpx]">
            活动管理</view>
          <view class="ml-auto">
            <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
          </view>
        </view>
        <view @click="navigateTo('/pages/schoolOrganization/schoolOrganization')"
          class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
          <view class="w-[53rpx]">
            <image class="w-[48rpx] h-[48rpx]"
              src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657c597a557.png">
            </image>
          </view>
          <view class=" ml-[15rpx]">
            我的学校组织</view>
          <view class="ml-auto">
            <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
          </view>
        </view>
        <view @click="navigateTo('/pages/myClassTeam/myClassTeam')"
          class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
          <view class="w-[53rpx]">
            <image class="w-[48rpx] h-[48rpx]"
              src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657c8f31b28.png">
            </image>
          </view>
          <view class=" ml-[15rpx]">
            我的班级团队</view>
          <view class="ml-auto">
            <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
          </view>
        </view>
        <view @click="navigateTo('/pages/registrationPayment/registrationPayment')"
          class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
          <view class="w-[53rpx]">
            <image class="w-[42rpx] h-[42rpx]"
              src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657cc26167b.png">
            </image>
          </view>
          <view class=" ml-[15rpx]">
            报名缴费</view>
          <view class="ml-auto">
            <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
          </view>
        </view> 
         <view @click="navigateTo('')" class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
          <view class="w-[53rpx]">
            <image class="w-[46rpx] h-[46rpx]"
              src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657ce9db4fb.png">
            </image>
          </view>
          <view class=" ml-[15rpx]">
            教辅商店</view>
          <view class="ml-auto">
            <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
          </view>
        </view>
        <view @click="navigateTo('/pages/myCollect/myCollect')"
          class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
          <view class="w-[53rpx]">
            <image class="w-[42rpx] h-[36rpx]"
              src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657d0de8bc1.png">
            </image>
          </view>
          <view class=" ml-[15rpx]">
            我的收藏</view>
          <view class="ml-auto">
            <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
          </view>
        </view>
        <view @click="navigateTo('/pages/myMessage/myMessage')"
          class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
          <view class="w-[53rpx]">
            <image class="w-[40rpx] h-[35rpx]"
              src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657d4473d19.png">
            </image>
          </view>
          <view class=" ml-[15rpx]">
            我的消息</view>
          <view class="ml-auto">
            <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
          </view>
        </view>
        <view @click="navigateTo('/pages/cooperativeDevelopment/cooperativeDevelopment')"
          class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
          <view class="w-[53rpx]">
            <image class="w-[44rpx] h-[44rpx]"
              src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657d7347f6f.png">
            </image>
          </view>
          <view class=" ml-[15rpx]">
            合作发展</view>
          <view class="ml-auto">
            <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
          </view>
        </view> 

         <view @click="navigateTo('')" class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
          <view class="w-[53rpx]">
            <image class="w-[46rpx] h-[46rpx]"
              src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657dbb6fafb.png">
            </image>
          </view>
          <view class=" ml-[15rpx]">
            个人资料编辑</view>
          <view class="ml-auto">
            <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
          </view>
        </view>
      </block>
      <block v-if="role == 'noLogin'">
        <view @click="navigateTo('/pages/picturesUpload/picturesUpload')"
          class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
          <view class="w-[53rpx]">
            <image class="w-[47rpx] h-[40rpx]"
              src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657a9c66bea.png">
            </image>
          </view>

          <view class=" ml-[15rpx]">一键拍照上传</view>
          <view class="ml-auto">
            <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
          </view>
        </view> 
        <view @click="navigateTo('/pages/cardManagement/cardManagement')"
          class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
          <view class="w-[53rpx]">
            <image class="w-[40rpx] h-[40rpx]"
              src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657b0a354ac.png">
            </image>
          </view>
          <view class=" ml-[15rpx]">卡券管理</view>
          <view class="ml-auto">
            <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
          </view>
        </view>
        <view @click="navigateTo('/pages/erventManagement_offlineEvents/erventManagement_offlineEvents')"
          class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
          <view class="w-[53rpx]">
            <image class="w-[50rpx] h-[50rpx]"
              src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657c142d093.png">
            </image>
          </view>
          <view class=" ml-[15rpx]">
            活动管理</view>
          <view class="ml-auto">
            <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
          </view>
        </view>
        <!-- <view @click="navigateTo('/pages/schoolOrganization/schoolOrganization')"
          class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
          <view class="w-[53rpx]">
            <image class="w-[48rpx] h-[48rpx]"
              src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657c597a557.png">
            </image>
          </view>
          <view class=" ml-[15rpx]">
            我的学校组织</view>
          <view class="ml-auto">
            <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
          </view>
        </view> -->
        <!-- <view @click="navigateTo('/pages/myClassTeam/myClassTeam')"
          class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
          <view class="w-[53rpx]">
            <image class="w-[48rpx] h-[48rpx]"
              src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657c8f31b28.png">
            </image>
          </view>
          <view class=" ml-[15rpx]">
            我的班级</view>
          <view class="ml-auto">
            <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
          </view>
        </view>
        <view @click="navigateTo('/pages/registrationPayment/registrationPayment')"
          class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
          <view class="w-[53rpx]">
            <image class="w-[42rpx] h-[42rpx]"
              src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657cc26167b.png">
            </image>
          </view>
          <view class=" ml-[15rpx]">
            报名缴费</view>
          <view class="ml-auto">
            <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
          </view>
        </view> -->
        <!-- <view @click="navigateTo('')" class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
          <view class="w-[53rpx]">
            <image class="w-[46rpx] h-[46rpx]"
              src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657ce9db4fb.png">
            </image>
          </view>
          <view class=" ml-[15rpx]">
            教辅商店</view>
          <view class="ml-auto">
            <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
          </view>
        </view>
        <view @click="navigateTo('/pages/myCollect/myCollect')"
          class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
          <view class="w-[53rpx]">
            <image class="w-[42rpx] h-[36rpx]"
              src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657d0de8bc1.png">
            </image>
          </view>
          <view class=" ml-[15rpx]">
            我的收藏</view>
          <view class="ml-auto">
            <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
          </view>
        </view>
        <view @click="navigateTo('/pages/myMessage/myMessage')"
          class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
          <view class="w-[53rpx]">
            <image class="w-[40rpx] h-[35rpx]"
              src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657d4473d19.png">
            </image>
          </view>
          <view class=" ml-[15rpx]">
            我的消息</view>
          <view class="ml-auto">
            <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
          </view>
        </view>
        <view @click="navigateTo('/pages/cooperativeDevelopment/cooperativeDevelopment')"
          class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
          <view class="w-[53rpx]">
            <image class="w-[44rpx] h-[44rpx]"
              src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657d7347f6f.png">
            </image>
          </view>
          <view class=" ml-[15rpx]">
            合作发展</view>
          <view class="ml-auto">
            <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
          </view>
        </view> -->

        <!-- <view @click="navigateTo('')" class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
          <view class="w-[53rpx]">
            <image class="w-[46rpx] h-[46rpx]"
              src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657dbb6fafb.png">
            </image>
          </view>
          <view class=" ml-[15rpx]">
            个人资料编辑</view>
          <view class="ml-auto">
            <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
          </view>
        </view> -->
        <view @click="navigateTo('')" class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
          <view class="w-[53rpx]">
            <image class="w-[47rpx] h-[40rpx]"
              src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657b0a354ac.png">
            </image>
          </view>
          <view class=" ml-[15rpx]">
            我的关注</view>
          <view class="ml-auto">
            <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
          </view>
        </view>

      </block>
      <template v-if="role == 'admin'">
        <view @click="navigateTo('/pages/individualAuthorizationManagement/individualAuthorizationManagement')"
          class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
          <view class="w-[53rpx]">
            <image class="w-[47rpx] h-[40rpx]"
              src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657b0a354ac.png">
            </image>
          </view>
          <view class=" ml-[15rpx]">
            个人授权管理</view>
          <view class="ml-auto">
            <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
          </view>
        </view>
        <view @click="navigateTo('/pages/teachingQuantityStatistics/teachingQuantityStatistics')"
          class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
          <view class="w-[53rpx]">
            <image class="w-[47rpx] h-[40rpx]"
              src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657b0a354ac.png">
            </image>
          </view>
          <view class=" ml-[15rpx]">
            教学数据统计</view>
          <view class="ml-auto">
            <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
          </view>
        </view>
        <view @click="navigateTo('/pages/courseDataManagement/courseDataManagement')"
          class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
          <view class="w-[53rpx]">
            <image class="w-[47rpx] h-[40rpx]"
              src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657b0a354ac.png">
            </image>
          </view>
          <view class=" ml-[15rpx]">
            课程数据管理</view>
          <view class="ml-auto">
            <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
          </view>
        </view>
        <view @click="navigateTo('/pages/projectCourse/projectCourse')"
          class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
          <view class="w-[53rpx]">
            <image class="w-[47rpx] h-[40rpx]"
              src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657b0a354ac.png">
            </image>
          </view>
          <view class=" ml-[15rpx]">
            项目课程管理</view>
          <view class="ml-auto">
            <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
          </view>
        </view>
        <view @click="navigateTo('')" class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
          <view class="w-[53rpx]">
            <image class="w-[47rpx] h-[40rpx]"
              src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657b0a354ac.png">
            </image>
          </view>
          <view class=" ml-[15rpx]">
            线下活动执行流程</view>
          <view class="ml-auto">
            <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
          </view>
        </view>
        <view @click="navigateTo('/pages/onePersonOneLeg/onePersonOneLeg')"
          class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
          <view class="w-[53rpx]">
            <image class="w-[47rpx] h-[40rpx]"
              src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657b0a354ac.png">
            </image>
          </view>
          <view class=" ml-[15rpx]">
            一人一档管理</view>
          <view class="ml-auto">
            <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
          </view>
        </view>
        <view @click="navigateTo('/pages/shareExperience/shareExperience')"
          class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
          <view class="w-[53rpx]">
            <image class="w-[47rpx] h-[40rpx]"
              src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657b0a354ac.png">
            </image>
          </view>
          <view class=" ml-[15rpx]">
            分享体验</view>
          <view class="ml-auto">
            <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
          </view>
        </view>
        <view @click="navigateTo('/pages/communityStatistics/communityStatistics')"
          class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
          <view class="w-[53rpx]">
            <image class="w-[47rpx] h-[40rpx]"
              src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657b0a354ac.png">
            </image>
          </view>
          <view class=" ml-[15rpx]">
            社区统计</view>
          <view class="ml-auto">
            <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
          </view>
        </view>
      </template>
      <view @click="navigateTo('/pages/secure/secure')"
        class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
        <view class="w-[53rpx]">
          <image class="w-[47rpx] h-[47rpx]" src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657de3ef166.png">
          </image>
        </view>
        <view class=" ml-[15rpx]">安全中心</view>
        <view class="ml-auto">
          <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
        </view>
      </view>
      <view @click="navigateTo('/pages/versionUpdate/versionUpdate')"
        class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
        <view class="w-[53rpx]">
          <image class="w-[42rpx] h-[42rpx]" src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657e5867535.png">
          </image>
        </view>
        <view class=" ml-[15rpx]">
          版本更新</view>
        <view class="ml-auto">
          <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
        </view>
      </view>
      <view @click="navigateTo('/pages/aboutUs/aboutUs')"
        class="h-[100rpx] flex items-center mx-[20rpx] border-b border-[#EFEFEF]">
        <view class="w-[53rpx]">
          <image class="w-[42rpx] h-[42rpx]" src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657e8f104ad.png">
          </image>
        </view>
        <view class=" ml-[15rpx]">
          关于我们</view>
        <view class="ml-auto">
          <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
        </view>
      </view>
      <view  @click="openLogin.togglePopupShow" class="h-[100rpx] flex items-center mx-[20rpx] ">
        <view class="w-[53rpx]">
           <uni-icons type="loop" size="30" class="w-[53rpx] h-[53rpx]"></uni-icons> 
        </view>
        <view class=" ml-[15rpx]">
          切换身份</view> 
        <view class="ml-auto">
          <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
        </view>
      </view>
      <view @click="navigateTo('')" class="h-[100rpx] flex items-center mx-[20rpx] ">
        <view class="w-[53rpx]">
          <image class="w-[53rpx] h-[53rpx]" src="https://tcimg.yangjc.com/upload/images/2024-12-20/67657ead00626.png">
          </image>
        </view> 
        <view class=" ml-[15rpx]">
          退出登录</view>
        <view class="ml-auto">
          <up-icon name="arrow-right" color="#94a3b8" size="15"></up-icon>
        </view>
      </view>
     
    <view> 
        <!-- 普通弹窗 -->
        <uni-popup ref="popup" background-color="#fff" @change="openLogin.change" class="w-[400rpx] h-[400rpx]" >
          <view class="popup-content" style="height: 450rpx; overflow: auto;   justify-content: center;
  align-items: center;">
            <uni-row class="demo-uni-row" gutter="0" width="730">
              <uni-col :span="12" :offset="6">
                <view class="demo-uni-col ">&nbsp</view>
              </uni-col>
            </uni-row>
            			<uni-row class="demo-uni-row" gutter="0" width="730">
                  <view  class="container" v-for="(item, index) in openLogin.model" :key="index">  
          					<uni-col :span="12" :offset="6">
          						<view class="demo-uni-col " @click="openLogin.clickSwitch(item.group_id)">{{item.username}}</view>
          					</uni-col>
          			
        <!--        <uni-row class="demo-uni-row dark"  >
          					<uni-col >
          						<view @click="openLogin.clickSwitch(item.group_id)"  class="demo-uni-col">{{item.username}}</view>
          					</uni-col>
          				</uni-row> -->
                  </view>
          	</uni-row>
          <uni-row class="demo-uni-row" gutter="0" width="730" >
          	<uni-col :span="12" :offset="6">
          		<view class="demo-uni-col " style="justify-content: center;
  align-items: center;" @click="openLogin.clickSwitchOK(4)">注册</view>
          	</uni-col>
          </uni-row>
<!--          <uni-row class="demo-uni-row"    @click="openLogin.clickSwitchOK(4)" >
          		<uni-col  >
          			<view class="demo-uni-col">注册</view>
          		</uni-col>
          	</uni-row> -->
              
      <!--         <button @click="" type="default" :disabled="openLogin.disabledAdmin" :plain="true">
                 注册 
                </button> -->
             <!--   </view> -->
                <!-- <button @click="openLogin.clickSwitch(3)" type="default" :disabled="openLogin.disabledAdmin" :plain="true"> 
                  管理员
                 </button> -->
               <!--  </view>
                 <view> 
               <button  @click="openLogin.clickSwitch(2)" type="default"  :disabled="openLogin.disabledTeacher"   :plain="true"> 
               班主任
               </button> 
               </view>-->
               <!--  <view> 
              <button @click="openLogin.clickSwitch(2)" type="default"  :disabled="openLogin.disabledStudent"  :plain="true"> 
               学员
               </button> 
               </view> -->

          </view>
        </uni-popup>
      </view>

    </view> 
    <view class="h-[140rpx]"></view>
   <Tabbar currentPage="2" ></Tabbar> 
  </view>

</template>

<script setup>
import Tabbar from "@/components/tabbar.vue";
import api from "@/api/api"
import my from "@/api/my"
import { useUserStore } from '@/stores/userinfo'
import { ref,reactive,onMounted } from "vue" 

const role = ref("noLogin")
const res = wx.getMenuButtonBoundingClientRect()
const top = ref(res.top) //胶囊距上距离
import {
	baseUrl
} from '@/utils/baseUrl.js';  
const pendantHight = ref(res.bottom - res.top) //胶囊高度
const userInfo = ref({})
const navigateTo = (url) => {
  uni.navigateTo({
    url
  })
} 
const popup=ref(null)
const getDataUril = reactive({
  getSplitImgUrl(IngUrl){
    return baseUrl+IngUrl
  }
})
const openLogin =reactive({ 
      model: [],
      disabledAdmin:  false,
      disabledTeacher: false ,
      disabledStudent: false ,
       change: async ()=>{  
       },
       clickSwitchOK: async => { 
         // uni.navigateTo({
         //   url: '/pages/register/register'
         // }) 
       },
       clickSwitch: async (e)=>{    
           const ress=await my.changeStudent() 
          if(ress.code == 200){ 
              const vv =JSON.parse( uni.getStorageSync('userInfo')) 
               uni.removeStorageSync('userInfo')
               uni.removeStorageSync('userInfo') 
               vv.group_id = e
               uni.setStorageSync('userInfo', JSON.stringify(ress.data))
               uni.setStorageSync('token', ress.data.authorization)  
               console.log(uni.getStorageSync('userInfo'))
               //debugger 
               uni.hideLoading()
               
               navigateTo('/pages/my/admin' )
       /*        // 先跳转到空白页再跳回来
               uni.redirectTo({
                   url: '/pages/my/empty',
                   complete: () => {
                       uni.redirectTo({
                           url: '/pages/my/my'
                       });
                   }
               }); */
     
          } 
       } ,
  		togglePopupShow:async () => {  
        const res = await my.getUserLognNoList({
          phone:userInfo.value.mobile
        })  
        if(res.code == 200  ){
            openLogin.model = res.data.accounts   
        } 
  			popup.value.open('bottom') 
  		}
}) 
const getUser = reactive({
  getUserWxInfo (){ 
    //获取头像
    wx.getUserProfile({
      desc: '用于完善会员资料', // 声明获取用户个人信息后的用途，后续会展示在弹窗中，请谨慎填写
      success: (res) => { 
        console.log("------------------") 
      }
    })
/*        wx.getUserInfo({
          success: function(res) {
            console.log("------------------")
            debugger
            }}) */
  }
})


const getINfo = reactive({ 
      getLoginData ()  {
        debugger
              const vv =JSON.parse( uni.getStorageSync('userInfo')) 
              console.log(vv)  
        if (uni.getStorageSync('token')) {
          role.value = "student"
          userInfo.value = JSON.parse(uni.getStorageSync('userInfo'))
        }
        if (uni.getStorageSync('isRegularUser') == "1") {
          uni.showModal({
            title: "提示",
            content: "填写个人资料，体验更多功能",
            confirmColor: "#FD755D",
            confirmText: "去填写",
            cancelText: "以后再说",
            cancelColor: "#b1b1b1",
            cancelable: true,
            success: (res) => {
              if (res.confirm) {
                uni.navigateTo({
                  url: '/pages/dataEdit/dataEdit'
                })
              }
            }
          })
        }
      }
})
getINfo.getLoginData()
//onMounted(getINfo.getLoginData()) 
</script>

<style lang="scss" scoped>
.bg {
  background: linear-gradient(180deg, rgba(255, 146, 127, 0.4) 4%, #F8F8F8 25%, #F8F8F8 100%);
}

.jf {
  background-color: rgba(253, 117, 93, .8);
} 
	.demo-uni-row {
		margin-bottom: 10px;

		// 组件在小程序端display为inline
		// QQ、抖音小程序文档写有 :host，但实测不生效
		// 百度小程序没有 :host
		/* #ifdef MP-TOUTIAO || MP-QQ || MP-BAIDU */
		display: block;
		/* #endif */
	}

	// 支付宝小程序没有 demo-uni-row 层级
	// 微信小程序使用了虚拟化节点，没有 demo-uni-row 层级
	/* #ifdef MP-ALIPAY || MP-WEIXIN */
	::v-deep .uni-row {
		margin-bottom: 10px;
	}

	/* #endif */

	.demo-uni-col {
		height: 36px;
		border-radius: 5px;
	}

	.dark_deep {
		background-color: #99a9bf;
	}

	.dark {
		background-color: #d3dce6;
	}

	.light {
		background-color: #e5e9f2;
	}

	.example-body {
		/* #ifndef APP-NVUE */
		display: block;
		/* #endif */
		padding: 5rpx 10rpx 0;
		overflow: hidden;
	}
  
  .demo-uni-row {
  		margin-bottom: 10px;
  
  		// 组件在小程序端display为inline
  		// QQ、抖音小程序文档写有 :host，但实测不生效
  		// 百度小程序没有 :host
  		/* #ifdef MP-TOUTIAO || MP-QQ || MP-BAIDU */
  		display: block;
  		/* #endif */
  	}
  
  	// 支付宝小程序没有 demo-uni-row 层级
  	// 微信小程序使用了虚拟化节点，没有 demo-uni-row 层级
  	/* #ifdef MP-ALIPAY || MP-WEIXIN */
  	::v-deep .uni-row {
  		margin-bottom: 10px;
  	}
  
  	/* #endif */
  
  	.demo-uni-col {
  		height: 36px;
  		border-radius: 5px;
  	}
 
</style>


